package com.jeeplus.test.jlnu.graduationInfo.mapper;

import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.jeeplus.test.jlnu.admissionInfo.domain.entity.AdmissionInfo;
import com.jeeplus.test.jlnu.admissionInfo.domain.entity.ImportFailLog;
import com.jeeplus.test.jlnu.changeStuInfo.domain.entity.ChangeStuInfo;
import com.jeeplus.test.jlnu.graduationInfo.domain.entity.NewGraduationInfo;
import com.jeeplus.test.jlnu.graduationInfo.domain.vo.NewGraduationInfoReqVo;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.Date;
import java.util.List;

@Mapper
public interface NewGraduationInfoMapper {


    //新增毕业信息
    void addGraduationInfo(NewGraduationInfoReqVo graduationInfoReqVo);

    //批量导入
    int batchUpdate(@Param("studentIds") List<String> studentIds,@Param("param") NewGraduationInfoReqVo param);

    //分页查询
    Page<NewGraduationInfoReqVo> getGraduationInfoPage(NewGraduationInfoReqVo graduationInfoReqVo, Page<NewGraduationInfoReqVo> page);

    //根据 ID 批量查询录取信息表
    List<NewGraduationInfo> selectBatchIds(@Param("ids") List<String> ids);

    //根据学号查询数据
    NewGraduationInfo selectByStudentId(String studentId);

    //修改
    void updateById(NewGraduationInfo existingRecord);

    //新增
    void insert(NewGraduationInfo newRecord);

    //批量修改
    int updateByIdBatch(@Param("studentIds") List<String> studentIds,
                         @Param("admissionUpdateDto") NewGraduationInfo graduationInfo);

    //批量提交
    int updateSubmitTypeByIds(@Param("submitType") String submitType,
                              @Param("ids") List<String> ids);

    List<ImportFailLog> selectPage(@Param("pageNum") int pageNum, @Param("pageSize") int pageSize, @Param("startTime") Date startTime, @Param("endTime")Date endTime, @Param("fileName")String fileName);


    int selectTotalCount(@Param("startTime") Date startTime,
                         @Param("endTime") Date endTime);

    void insertImportLog(ImportFailLog failLog);

    int batchUpdateGraduation(@Param("ids") List<Long> ids,@Param("transferState") String transferState);

    int batchUpdateGraduationInfo(@Param("admissionInfos") List<AdmissionInfo> admissionInfos, @Param("transferState") String transferState);

    int batchUpdateById(@Param("ids") List<String> ids,@Param("changeStuInfo") NewGraduationInfo graduationInfo);

}
